package com.cmc.cloud.cmclink.doc.vo.specialcargocasvo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 特种货申请dg下cas信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class SpecialCargoCasBaseVO {

    @Schema(description = "DG货物限制信息ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26008")
    @NotNull(message = "{SpecialCargoCasBaseVO.specialCargoDgId.notNull}")
    private Long specialCargoDgId;

    @Schema(description = "CAS组号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoCasBaseVO.casNoGroup.notBlank}")
    @Length(max = 30, message = "{SpecialCargoCasBaseVO.casNoGroup.length}")
    private String casNoGroup;

    @Schema(description = "化学品唯一编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoCasBaseVO.casNo.notBlank}")
    @Length(max = 30, message = "{SpecialCargoCasBaseVO.casNo.length}")
    private String casNo;

    @Schema(description = "最小含量%", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoCasBaseVO.minPercent.notNull}")
    private BigDecimal minPercent;

    @Schema(description = "最大含量%", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoCasBaseVO.maxPercent.notNull}")
    private BigDecimal maxPercent;

}
